Inserting into point[] type.

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C48042.2B0F33F0
Content-Type: text/plain


How do you insert into a column of type point[]

Sample table:
CREATE TABLE public.test
(
Column_a varchar(1000),
Column_b point[]
) WITHOUT OIDS;


I have tried without success:

insert into test (Column_a, Column_b) values
('Aargau','{47.3899993896,8.03400039673}')

Theo


____________________________________________________________ __________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright. If you
have received this email in error, please advise the sender and delete
it. If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone. You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.
------_=_NextPart_001_01C48042.2B0F33F0
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Inserting into point[] type.</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">How do you insert into a column of type point[] </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Sample table:</FONT>
<BR><FONT SIZE=2 FACE="Arial">CREATE TABLE public.test</FONT>
<BR><FONT SIZE=2 FACE="Arial">(</FONT>
<BR><FONT SIZE=2 FACE="Arial">  Column_a varchar(1000),</FONT>
<BR><FONT SIZE=2 FACE="Arial">  Column_b point[]</FONT>
<BR><FONT SIZE=2 FACE="Arial">) WITHOUT OIDS;</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">I have tried without success:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">insert into test (Column_a, Column_b) values ('Aargau','{47.3899993896,8.03400039673}')</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Theo</FONT>
</P>

</BODY>
</HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000> ____________________________________________________________ __________<br>This email, including attachments, is intended only for the addressee<br>and may be confidential, privileged and subject to copyright. If you<br>have received this email in error, please advise the sender and delete<br>it. If you are not the intended recipient of this email, you must not<br>use, copy or disclose its content to anyone. You must not copy or <br>communicate to others content that is confidential or subject to <br>copyright, unless you have the consent of the content owner.<br></font></td></tr></table>
------_=_NextPart_001_01C48042.2B0F33F0--
Theo.Galanakis [ Do, 12 August 2004 09:58 ] [ ID #453244 ]

Re: Inserting into point[] type.

=D0=92 =D0=A7=D1=82=D0=B2, 12.08.2004, =D0=B2 09:58, Theo Galanakis =D0=BF=
=D0=B8=D1=88=D0=B5=D1=82:
> How do you insert into a column of type point[]

> I have tried without success:
>
> insert into test (Column_a, Column_b) values
> ('Aargau','{47.3899993896,8.03400039673}')

I'd guess '{(3.3, 4.4), (1.0, 4.3)}' or ARRAY[(3.3, 4.4), (1.0, 4.3)].
Maybe even something like '{''(3.3, 4.4)'', ''(1.0, 4.3)''}'

--
Markus Bertheau <twanger [at] bluetwanger.de>



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo [at] postgresql.org
twanger [ Do, 12 August 2004 10:27 ] [ ID #453245 ]
Datenbanken » comp.databases.postgresql.sql » Inserting into point[] type.

Vorheriges Thema: Sending errors from psql to error file
Nächstes Thema: Maybe install debian on your home pc?